package com.freight.core.service;


import com.freight.core.base.FreightBaseService;
import com.freight.core.entity.User;
import com.freight.core.entity.UserRole;

import java.util.List;

/**
 * 用户角色接口
 * @describe x
 */
public interface UserRoleService extends FreightBaseService<UserRole, Long> {

    /**
     * 通过roleId查找
     * @param roleId
     * @return
     */
    List<UserRole> findByRoleId(Long roleId);




    /**
     * 通过roleName查找
     * @param roleName
     * @return
     */
    List<User> findUserByRoleName(String roleName);

    /**
     * 通过roleId查找用户
     * @param roleId
     * @return
     */
    List<User> findUserByRoleId(Long roleId);

    /**
     * 删除用户角色
     * @param userId
     */
    void deleteByUserId(Long userId);
}
